home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
stufit.arc
/
STUFIT.DOC
< prev
Wrap
Text File
|
1985-11-18
|
14KB
|
261 lines
STUFIT.COM
Disk file stuffer
-----------------
V0.6 release 6.14.85
Released to to public domain for personal use only.
(c) 1985 Zider Brothers, San Francisco
WARNING: You may lose a file with this program if you:
. interrupt it during operation
. run it on a non-IBM compatible machine
This loss is temporary. See "Caution" section below.
Program description
-------------------
STUFIT is a program that "stuffs" files into the inner part of the disk.
That is, it will move a file from the outer part of a disk and into the
free area nearest the spindle. As a result, this inner area can be used for
lesser-used programs, freeing up the outside tracks for working space.
File access times can be improved considerably, especially for disks
that are more than half full.
The program works for hard disks and diskettes.
Program syntax help is available on-line, by specifying the program with
no arguments. Paths are accepted, but a drive designation other
than the default drive will generate an error.
Disk space management
---------------------
The below display shows the space usage of a typical, just-loaded diskette.
All the lower-numbered tracks (those closest to the directory) are fully
loaded. The higher-numbered tracks (those closest to the disk spindle,
toward the inner part of the disk) are all empty:
----------------
Space Usage for the Complete Diskette
63% 452 sectors given to available free space
1 sector given to the boot record
1% 4 sectors given to the file allocation table
1% 7 sectors given to the file directory
36% 256 sectors given to normal files
No sectors given to hidden, system or read-only files
No sectors given to unavailable space (free with CHKDSK)
No sectors given to conflicting file space allocation
No sectors given to Bad-Track (unusable)
Map of Diskette Space
Track 1 2 3 3
0123456789012345678901234567890123456789
1 B■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ ░ Unused sector (free space)
Side S 3 F■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ B Boot record
0 e 5 F■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ F File allocation table
c 7 D■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ D Directory
╞════ t 9 D■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ ■ In use by a normal file
o 2 D■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ h Hidden, system, read-only
Side r 4 ■■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ █ Temporarily unavailable
1 6 ■■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░ X Conflicting allocation
8 ■■■■■■■■■■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░░ b Bad-Track (unusable)
F1-help F2-save F3-new file F4-import data F9-expand F10-contract Esc-exit
-------------------------------
The complete diskette can all be stuffed by logging over to A: and executing
the program with *.*:
A>stufit *.*
The reorganized disk then looks as follows:
----------------
Space Usage for the Complete Diskette
63% 452 sectors given to available free space
1 sector given to the boot record
1% 4 sectors given to the file allocation table
1% 7 sectors given to the file directory
36% 256 sectors given to normal files
No sectors given to hidden, system or read-only files
No sectors given to unavailable space (free with CHKDSK)
No sectors given to conflicting file space allocation
No sectors given to Bad-Track (unusable)
Map of Diskette Space
Track 1 2 3 3
0123456789012345678901234567890123456789
1 B░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ ░ Unused sector (free space)
Side S 3 F░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ B Boot record
0 e 5 F░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ F File allocation table
c 7 D░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ D Directory
╞════ t 9 D░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ ■ In use by a normal file
o 2 D░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ h Hidden, system, read-only
Side r 4 ░░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ █ Temporarily unavailable
1 6 ░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■■ X Conflicting allocation
8 ░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■■ b Bad-Track (unusable)
F1-help F2-save F3-new file F4-import data F9-expand F10-contract Esc-exit
-----------------------------
All the quick-access space near the directory is now free for working
storage.
A more representative hard disk situation is shown below. Here, the disk
has had a number of reference subdirectories stuffed into the inside,
leaving a working space in the middle of the disk:
-----------------------
╔════════════════════════════════════════════════════════════════════════════
║ Menu 2.3 ║
║ Map of Space Usage for the Entire Disk ║
║ ║
║ 34% of disk space is free ║
║ ║
║ Proportional Map of Disk Space ║
║ ■ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■B■■■■■■■ B ║
║ represents ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ represents ║
║ space ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ bad ║
║ in use ░░■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■░░░ sectors ║
║ ░░░■■░░░░░░░■░░░░░░░░░░■░■■■■■■■■■■■■░░░░░░░░░░░░░ ║
║ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
║ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
║ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░■■░■■■■■■■░■■■■■■■■ ║
║ ■■■■■■■■■■■■■■■■■■■■■■■░░░░■■■■■■■■■■■■■■■■■■■■■■■ ║
║ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ║
║ Each position represents 1/500th of the total disk space ║
║ ║
║ Press any key to continue... ║
║ ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ Currently selected: No file or disk sector selected ║
║ Drive C: Directory: root directory ║
F1-help F2-save F3-new file F4-import data F9-expand F10-contract Esc-exit
-----------------------
At this point, the disk could no doubt benefit from stuffing some more of the
less-frequently used files into the inside of the disk, freeing up the space
nearest the outside.
In the final display below, the root directory files and the files on two
of the larger subdirectories were stuffed. The inner space of the disk
is packed, but the outer/closer area is now fragmented. At some
point a disk needs periodic maintenance in the form of a complete
backup and restore, using STUFIT to put reference files away from the out-
side of the disk.
------------------
╔════════════════════════════════════════════════════════════════════════════
║ Menu 2.3 ║
║ Map of Space Usage for the Entire Disk ║
║ ║
║ 36% of disk space is free ║
║ ║
║ Proportional Map of Disk Space ║
║ ■ ■■■■■■■■■■░░░░░■■░■░■░■░░░■■░■■■■■■■■■■■■░B░░░░■■■ B ║
║ represents ■■■■■■■■■■■■■■■░■░░░░░░░■░░░■░■■░░■■■■■■■■■░░■░■■■ represents ║
║ space ■■■■■■■■■■■■■■░■■░■░■░░░░░░░░░░░░░■■■■■░░░░░░■■░■■ bad ║
║ in use ░■░■░░░░░░░░░░░░░░■■■■■░░░░░░░░░░░░░░░░░░░░░░░░░░░ sectors ║
║ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
║ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░■■■■■■■■■■■■■■ ║
║ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ║
║ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ║
║ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ║
║ ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ║
║ Each position represents 1/500th of the total disk space ║
║ ║
║ Press any key to continue... ║
║ ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ Currently selected: No file or disk sector selected ║
║ Drive C: Directory: root directory ║
F1-help F2-save F3-new file F4-import data F9-expand F10-contract Esc-exit
-------------------------------
Operating Considerations
------------------------
CAUTION
-------
This program copies, deletes and renames files in the course of operation.
For this reason, if the program is interrupted you may lose a single file.
This loss is temporary. The following procedure will allow you to recover
the lost file, if any.
Assuming you have interrupted the operation from the keyboard with ^<Break>
or ^C, do the following:
. Write down the last two file names appearing on the screen list
of file being processed. Names on this list appear as the
file is to be processed, not after it has been stuffed. One
or the other file may have been lost, but not both.
. Do a DIR on the default directory and look for a file named ZZ.TOP.
This is the temporary target file to which the original file
has been copied. If it still exists, then it means the operation
was interrupted before this temporary file could be renamed to
the original file name. It may also mean that the original file
still exists as well--see next step.
. Do a DIR on the directory being reorganized (this may not be the
default directory if a path was specified, as with
C>stufit \cq\*.*). If the original file still exists, then
it has not yet been deleted. If the original file does not
exist, then it has already been deleted and the file ZZ.TOP
contains the original file contents, but in a new upper/inner
disk location as a result of being stuffed. You may copy the
file ZZ.TOP to original path\filename, and delete ZZ.TOP.
The file will now be "un-stuffed", but at least will be
restored to the original directory.
Alternatively, you may MV (move) ZZ.TOP to the original
directory. With this program, only the file directory
entries are changed--the file contents themselves remain on
the disk at the same (stuffed) location. MV will create the
original file name entry on the named directory, move (copy) the
directory entry data from ZZ.TOP over to this directory, and
then delete the ZZ.TOP entry from the default directory.
. DIR the default directory and look for a file named GOBBIGE.TXT. If
this file still exists, delete it. It is a place-holding file
only, with no content.
The foregoing procedure should allow you to interrupt the operation and
recover any files that may have been in an intermediate state of transfer.
Since the program operates on single files at a time, this will affect
at most one file.
Inspection of the assembly source file MAIN.ASM should clarify further
the actual steps executed by the program.
Setting BREAK to OFF will not solve the problem, but will limit the
points at which the program operation can be interrupted.
If you are using this program on a non-IBM machine, you should proceed
with some caution. It has only been tested on an IBM PC XT and an IBM
Portable Personal Computer. It is best in any case to work with a
subdirectory first to limit any damage that may occur as a result of
using this program on your system.
Other
-----
This document includes screen images from the Norton Utilities version 2.01
and 3.0 captured with the Notepad function of SideKick. The document
will print correctly on an IBM PC Graphics printer, but may have some
problems with other printers that do not support the high-bit graphics
characters in the PC graphics character set. This document also has lines
longer than 80 characters, so TYPE'ing this file to the screen will
result in wrapped long lines. Use LIST.COM to display this doc
without line wrap.
Doc: 11:47:11 6/14/1985